/*
 * DistributionAlgo is used in order to manage the different distribution algorithm
 * used by the sensorNetwork
 *
 * @created 2007-04-25
 * @author csamson
 * @author tlopez
 *
 */

package objects.distribution;
import java.io.Serializable;
import java.awt.event.*;
import java.awt.*;
import java.awt.geom.*;
import kernel.Simulator;
import objects.*;


public abstract class DistributionAlgo{

    //Attribute
    
    //Area of distribution
    protected double _ulX;
    protected double _ulY;
    protected double _width;
    protected double _height;
    //Number of sensors
    protected int _sensorAmount;
       
    double _measRad;
	
    //methods

    public DistributionAlgo(){
    }
    
    /**
     * @param s the targeted sensorNetwork
     */
    public void setSensorNetwork(SensorNetwork s){
	_ulX = s.getX();
	_ulY = s.getY();
	_width = s.getWidth();
	_height = s.getHeight();
	_sensorAmount = s.getSensorAmount();
	_measRad = s.getProto().getMeasurementRadius();
    }

    /**
     *The interface distribution constructor
     *
     * @param x the upperLeft corner X coordonate of the sensorNetwork
     * @param y the upperLeft corner Y coordonate of the sensorNetwork
     * @param w the sensorNetwork width
     * @param h the sensorNetwork height
     * @param s the number of sensor in the sensorNetwork
     *
     */
    public DistributionAlgo(double x, double y, double w, double h, int s){
    }

    
    /**
     * @return the algorithm name
     */
    public abstract String getName();
    
    /**
     * @return the point table used to place the sensors
     */
    public abstract Point2D[] distribute();
  
    
}
